<template>
    <view class="page container">
        <view class="information-title">{{ info.title }}</view>
        <view class="flex-between-center fs-28 c-677585 mt-18 mb-32">
            <text>{{ info.createtime_text || '' }}发布</text>
            <text>浏览 {{ info.see_num || 0 }}次</text>
        </view>
        <u-parse :content="content"></u-parse>
    </view>
</template>
<script>
import { jiu_news_detailApi } from "@/services/home.js";
export default {
    data() {
        return {
            info: {},
            content: ''
        }
    },
    onLoad(options) {
        this.getNewsDetail(options.id);
    },
    methods: {
        getNewsDetail(id) {
            jiu_news_detailApi({
                id: id
            }).then((res) => {
                this.info = res.data?.news_info || {};
                this.content = res.data?.news_info?.content || '';
            });
        }
    }
}
</script>
<style lang="scss" scoped>
.page {
    padding: 36rpx 40rpx;

    .information-title {
        font-size: 40rpx;
        font-weight: 500;
    }
}
</style>